package com.zhixiang.core.security;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;

import com.zhixiang.xaec.entity.system.AppRole;
import com.zhixiang.xaec.service.system.AppRoleService;

public class SecurityDataSource
{
  private AppRoleService appRoleService;
  private HashSet<String> anonymousUrls = null;
  private HashSet<String> publicUrls = null;

  public SecurityDataSource()
  {
    this.anonymousUrls = null;
    this.publicUrls = null;
  }

  public void setAppRoleService(AppRoleService paramAppRoleService)
  {
    this.appRoleService = paramAppRoleService;
  }

  public Set<String> getAnonymousUrls()
  {
    return this.anonymousUrls;
  }

  public void setAnonymousUrls(Set<String> paramSet)
  {
    this.anonymousUrls = (HashSet<String>)paramSet;
  }

  public HashSet<String> getPublicUrls()
  {
    return this.publicUrls;
  }

  public void setPublicUrls(HashSet<String> paramHashSet)
  {
    this.publicUrls = paramHashSet;
  }

  public HashMap<String, Set<String>> getDataSource()
  {
    HashMap<String, Set<String>> localHashMap = this.appRoleService.getSecurityDataSource();
    localHashMap.put(AppRole.ROLE_ANONYMOUS, this.anonymousUrls);
    localHashMap.put(AppRole.ROLE_PUBLIC, this.publicUrls);
    return localHashMap;
  }
}

